const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  chainWebpack: (config) => {
    config.plugin('define').tap((definitions) => {
      Object.assign(definitions[0], {
        __VUE_OPTIONS_API__: 'true',
        __VUE_PROD_DEVTOOLS__: 'false',
        __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false'
      })
      return definitions
    })
  },
  transpileDependencies: true,
  devServer: {
    
    proxy: {
      '/api': {
        target: 'http://10.50.40.3:9999/',
        changeOrigin: true,
        pathRewrite: {
          '^/api':''
        }
       
        // onProxyReq: function (proxyReq, req, res) {
        //   console.log('Proxy Path:',req.target, req.originalUrl,req.path);
        // }

      }
    }
  }
})
